import { Component, Input, OnInit } from '@angular/core';
import { SFSchema } from '@delon/form';
import { ApiService } from '@core/services/api';
import { HttpClient } from '@angular/common/http';
import { NzMessageService, NzModalRef } from 'ng-zorro-antd';
import { NzTabPosition } from 'ng-zorro-antd/tabs';
import { SPage } from '@shared/components/table-page/table-page.component';

@Component({
  selector: 'autho-edit',
  templateUrl: './autho-edit.component.html',
  styles: []
})
export class AuthoEditComponent implements OnInit {
  @Input()
  set _param(value) {
    if (!value) return;
    this.param = value;
    this.config.defaultParam={"id":value.id}
  };
  param: any;
  showForm = false;
  config: SPage = {
    columns: [
      {
        index: 'houseAddress',
        title: '楼栋地址',
        className:'w200'
      },
      {
        index:'deviceSn',
        title:'设备sn'
      }],
      reqUrl:"/core/door/card/queryRenterHouseList",
  }
  constructor(
    private api: ApiService,
    private http: HttpClient,
    private msg: NzMessageService,
    private modalRef: NzModalRef
  ) { }
  nzTabPosition: NzTabPosition = 'left';
  async ngOnInit() {
    // this.http.post('/core/door/card/queryRenterHouseList', {id:this.param.id}).subscribe((res:any) => {
    //   if (res.status == '200') {
    //     this.config.data = res.data.list;
    //   }
    // })
  }
}
